package com.lysj.food.food.service;

import com.lysj.admin.utils.spring.foundation.base.BaseService;
import com.lysj.food.food.domain.FoodType;
import com.lysj.food.food.repository.FoodTypeRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.transaction.Transactional;
import javax.annotation.Resource;
import java.util.List;

/**
 * @author Created by wtl on 2019-03-22 15:36:17
 * @description 菜品类型服务层
 */
@Slf4j
@Service
@Transactional
public class FoodTypeService implements BaseService<FoodType> {

    @Resource
    private FoodTypeRepository foodTypeRepository;

    @Override
    public FoodTypeRepository getRepository() {
        return foodTypeRepository;
    }

    /**
     * @author Created by wtl on 2019/3/26 16:42
     * @Description 根据门店id查询门店的菜品类型列表
     * @param storeId 门店id
     */
    public List<FoodType> findByStoreId(String storeId) {
        return foodTypeRepository.findByStoreId(storeId);
    }


}